<?php 
$this->activemenu='i1';
?>
<style type="text/css">
		
		p#cross-links { text-align: center }
		
		p#cross-links { border-bottom: 1px solid #ccc; margin-bottom: 30px; padding-bottom: 30px }
		
		.slider-wrap { /* This div isn't entirely necessary but good for getting the side arrows vertically centered */
			position: relative;
			width: 100%;
		}

		/* These 2 lines specify style applied while slider is loading */
		.csw {width: 100%; height: 460px; background: #fff; overflow: scroll}
		.csw .loading {margin: 200px 0 300px 0; text-align: center}

		.stripViewer { /* This is the viewing window */
			position: relative;
			overflow: hidden; 
			clear: both;
			color: #fff;
		}
		
		.stripViewer .panelContainer { /* This is the big long container used to house your end-to-end divs. Width is calculated and specified by the JS  */
			position: relative;
			left: 0; top: 0;
			width: 100%;
			list-style-type: none;
			/* -moz-user-select: none; // This breaks CSS validation but stops accidental (and intentional - beware) panel highlighting in Firefox. Some people might find this useful, crazy fools. */
		}
		
		.stripViewer .panelContainer .panel { /* Each panel is arranged end-to-end */
			float:left;
			height: 100%;
			position: relative;
			width: 430px; /* Also specified in  .stripViewer  above */
		}
		
		.stripViewer .panelContainer .panel .wrapper { /* Wrapper to give some padding in the panels, without messing with existing panel width */
			padding: 5px 10px;
		}
		
		.stripNav { /* This is the div to hold your nav (the UL generated at run time) */
			margin-left: 15px;
		}
		
		.stripNav ul { /* The auto-generated set of links */
			list-style: none;
			overflow: hidden;
			padding: 0;
			margin: 10px 0 0;
		}
		
		.stripNav ul li {
			float: left;
			margin-right: 2px; /* If you change this, be sure to adjust the initial value of navWidth in coda-slider.1.1.1.js */
		}
		
		.stripNavL, .stripNavR { /* The left and right arrows */
			position: absolute;
			top: 230px;
			text-indent: -9000em;
		}
		
		.stripNavL a, .stripNavR a {
			display: block;
			height: 40px;
			width: 40px;
		}
		
		.stripNavL {
			left: 0;
		}
		
		.stripNavR {
			right: 0;
		}
		
	</style>
<script type="text/javascript">
		jQuery(window).bind("load", function() {
			jQuery("div#slider1").codaSlider()
			// jQuery("div#slider2").codaSlider()
			// etc, etc. Beware of cross-linking difficulties if using multiple sliders on one page.
		});
</script>
<div class="home">
	<div class="lastest">
		<div class="slider-wrap">
	<div id="slider1" class="csw">
		<div class="panelContainer">
		
			<div class="panel" title="Tin tức">
				<div class="wrapper">
					<?php if($articles):
					echo '<ul>';
					foreach ($articles as $key => $value):
					$year = date('Y',strtotime($value['created']));
					$month = date('m',strtotime($value['created']));
					$link = Yii::app()->createUrl('/site_frontend/index/detail',array('alias'=>$value['alias'],'cat'=>$value['cat_alias'],'year'=>$year,'month'=>$month));
					?>
					<li><a href="<?php echo $link;?>"><span style="float: left;"><?php echo $value['title'];?></span><span><?php echo date("d/m/Y",strtotime($value['created']));?></span></a></li>
					<?php 
					endforeach;
					echo '</ul>';
					endif;
					?>
					<div style="text-align: right;margin-top:10px;">&raquo;&nbsp;<a href="<?php echo Yii::app()->createUrl('/site_frontend/index/category', array('alias'=>'tin-tuc'));?>">Xem thêm</a></div>
				</div>
			</div>
			<div class="panel" title="Bảo trì">
				<div class="wrapper">
					<?php if($articles):
					echo '<ul>';
					foreach ($articles as $key => $value):
					$year = date('Y',strtotime($value['created']));
					$month = date('m',strtotime($value['created']));
					$link = Yii::app()->createUrl('/site_frontend/index/detail',array('alias'=>$value['alias'],'cat'=>$value['cat_alias'],'year'=>$year,'month'=>$month));
						if($value['cat_alias']=='bao-tri'){
							echo "<li class=\"row\"><a href=\"{$link}\"><span style=\"float: left;\">{$value['title']}</span><span>".date("d/m/Y",strtotime($value['created']))."</span></a></li>";
						}else{
							echo "";
						}
					endforeach;
					echo '</ul>';
					endif;
					?>
				</div>
			</div>		
			<div class="panel" title="Sự kiện">
				<div class="wrapper">
					<?php if($articles):
					echo '<ul>';
					foreach ($articles as $key => $value):
						$year = date('Y',strtotime($value['created']));
						$month = date('m',strtotime($value['created']));
						$link = Yii::app()->createUrl('/site_frontend/index/detail',array('alias'=>$value['alias'],'cat'=>$value['cat_alias'],'year'=>$year,'month'=>$month));
						if($value['cat_alias']=='su-kien'){
							echo "<li class=\"row\"><a href=\"{$link}\"><span style=\"float: left;\">{$value['title']}</span><span>".date("d/m/Y",strtotime($value['created']))."</span></a></li>";
						}else{
							echo "";
						}
					endforeach;
					echo '</ul>';
					endif;
					?>
				</div>
			</div>
			
		</div><!-- .panelContainer -->
	</div><!-- #slider1 -->
</div><!-- .slider-wrap -->
	</div>
	<div class="movie">
	<img src="<?php echo Yii::app()->theme->baseUrl; ?>/images/movie.jpg" />
	</div>
</div>